package main

import (
	"fmt"
	"net"
	"strconv"
	"sync"
	"time"
)

func main() {

	var wg sync.WaitGroup

	for i := 0; i < 255; i++ {
		wg.Add(1)
		go func() {
			defer wg.Done()
			s := "192.168.0." + strconv.Itoa(i) + ":22"
			_, err := net.DialTimeout("tcp", s, time.Second)
			if err != nil {
				return
			}
			fmt.Println(s)
		}()
	}
	wg.Wait()

}
